ImageStorageVertical

A fairly simple image storage type using a vertical scan line memory order.

Will automatically deallocate its memory when it goes out of scope. Should not be copied or moved around.

Constructors

this
this(size_t width, size_t height, IAllocator allocator)

Destructor

~this
~this()
Undocumented in source.

Members

Functions

getPixel
Color getPixel(size_t x, size_t y)
opIndex
Color opIndex(size_t x, size_t y)
opIndexAssign
void opIndexAssign(Color value, size_t x, size_t y)
resize
bool resize(size_t newWidth, size_t newHeight)
setPixel
void setPixel(size_t x, size_t y, Color value)

Properties

height
size_t height [@property getter]
width
size_t width [@property getter]

Examples

import std.experimental.color;
ImageStorageVertical!RGB8 image = ImageStorageVertical!RGB8(1, 1);
image.resize(2, 2);

assert(image.width == 2);
assert(image.height == 2);
assert(image[1, 1] == image[0, 0]);

See Also

ImageStorage

Meta